// 获取数据列表元素
var dataList = document.getElementById('data-list');

// 生成10条数据
var predictions = JSON.parse('{{ predictions|tojson|safe }}');
for (var i = 0; i < predictions.length; i++) {
  var row = predictions[i];
  var li = document.createElement('li');
  li.textContent = row[0] + " - " + row[1] + " - " + row[2];
  dataList.appendChild(li);
}